#include <stdio.h> 
#include <pcap.h> 
#include <arpa/inet.h> 
#include <time.h> 
#include <stdlib.h> 
#include <string.h> 
#include <unistd.h>
#include <libnet.h>
#include <pthread.h>

#define BUFSIZE 1514

#ifndef SEND_RECV_H__
#define SEND_RECV_H__

typedef unsigned short u16;
typedef unsigned char u8;
typedef unsigned int u32;


struct one_128b{
	u16 conf_type[2];	//* 0 is start sending, 1 is stop sending;
						//* 2 is configure pkt, 3 is read packet;
						//* 4 is set internal clks;
	u32 pad;
	u32 data_1;
	u32 data_2;
};

struct context{
	struct one_128b one128b[100];
};

struct send_ctx{
	u16 type;
	int lens;
	struct context payload;
};



void start_sending_pkt(void);
void stop_sending_pkt(void);
void conf_sending_pkt(void);
// void read_sending_pkt(void);
void set_internal_clks(int value);

#endif
